// doc_idle.js
// Author: ThomW

// This injects each script that the user has activated.
// The first time this is run after the extension is installed, all of the 
// scripts are injected (hence the true/true) regardless of defaults in 
// common.js since main.js doesn't have access to that information 

// This injects the common functions, such as the GM_ replacement functions and the Comment Settings modifications
injectFile('injected/common.js');

// Inject files only if they're enabled
if (GM_getValue('collapse_post', 'true') == 'true') { injectFile('injected/collapse.js'); }
if (GM_getValue('mod_marker', 'true') == 'true') { injectFile('injected/modmarker.js'); }
if (GM_getValue('category_banners', 'true') == 'true') { injectFile('injected/category_banners.js'); }
if (GM_getValue('comment_tags', 'true') == 'true') { injectFile('injected/comment_tags.js'); }
if (GM_getValue('message_user', 'true') == 'true') { injectFile('injected/message_user.js'); }
if (GM_getValue('new_comments_marker', 'true') == 'true') { injectFile('injected/newcommentsmarker.js'); }
if (GM_getValue('post_preview', 'true') == 'true') { injectFile('injected/post_preview.js'); }
if (GM_getValue('Lolscript', 'true') == 'true') { injectFile('injected/lol.js'); }
if (GM_getValue('sparkly_comics', 'true') == 'true') { injectFile('injected/sparkly_comics.js'); }
if (GM_getValue('shack_message_notify', 'true') == 'true') { injectFile('injected/shack_message_notify.js'); }
if (GM_getValue('shacktimezone', 'true') == 'true') { injectFile('injected/shacktimezone.js'); }
if (GM_getValue('work_shack', 'true') == 'true') { injectFile('injected/work_shack.js'); }
if (GM_getValue('gegtiks_dinosaur_comics', 'true') == 'true') { injectFile('injected/gegtiks_dinosaur_comics.js'); }
if (GM_getValue('shugashack', 'true') == 'true') { injectFile('injected/shugashack.js'); }
if (GM_getValue('embed_video', 'true') == 'true') { injectFile('injected/video.js'); }
if (GM_getValue('friendfoe', 'true') == 'true') { injectFile('injected/friendfoe.js'); }
injectFile('injected/search_amazon.js');

// injectFile('injected/scrollIntoViewFix.js'); 